-- GENERATED SPELL FOR [Dark Rune Champion] --


function spell0_32876(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(32323,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32876', 2278, 1)
end

function spell1_32876(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(35054,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32876', 5344, 1)
end

function spell2_32876(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15578,pUnit)
pUnit:RegisterEvent('Sorts_32876', 637, 1)
end

function spell3_32876(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(33500,pUnit)
pUnit:RegisterEvent('Sorts_32876', 2000, 1)
end

function Sorts_32876(pUnit, Event)
local choix_sorts_32876 = math.random(0, 3)
if choix_sorts_32876 == 0 then
pUnit:RegisterEvent('spell0_32876', 1, 1)
end
if choix_sorts_32876 == 1 then
pUnit:RegisterEvent('spell1_32876', 1, 1)
end
if choix_sorts_32876 == 2 then
pUnit:RegisterEvent('spell2_32876', 1, 1)
end
if choix_sorts_32876 == 3 then
pUnit:RegisterEvent('spell3_32876', 1, 1)
end
end

function mob32876_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32876', math.random(1500, 3000), 1)
end

function mob32876_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32876_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32876_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32876, 1, 'mob32876_Action')
RegisterUnitEvent(32876, 2, 'mob32876_Leave')
RegisterUnitEvent(32876, 3, 'mob32876_Kill')
RegisterUnitEvent(32876, 4, 'mob32876_Die')
